package com.user.profile.dao;

import com.user.profile.entity.UserEntity;
import java.util.List;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {

  @Insert("INSERT INTO `user` (vip_level , ip, age) VALUES (#{vipLevel}, #{ip}, #{age})")
  void save(@Param("vipLevel") String vipLevel,
      @Param("ip") Integer ip,
      @Param("age") Integer age);

  @Select("SELECT * FROM `user`")
  List<UserEntity> selectAll();

}
